<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>5</title>
    </head>
    <body>
        <div id="app">
            {{num}} 转美元 {{num |str}}<br/>
            {{num}} 转人民币 {{num |str1}}
        </div>
        <script src="../js/vue.js"></script>
        <script>
            var app = new Vue({
                el: "#app",
                data: {
                    num: 1234
                },
                filters: {
                    str: function (value) {
                        return '$' + value
                    },
                    str1: function (value) {
                        return '￥' + value
                    }
                }
            })
        </script>
    </body>
</html>